package com.itheima.chapter04.arraylist;

import com.itheima.domian.Student;
/*
    对象数组
 */
public class demo1 {
    public static void main(String[] args) {
        Student[] arr =new Student[3];
        Student stu1 =new Student("张三",23);
        Student stu2 =new Student("李四",13);
        Student stu3 =new Student("王五",33);
        arr[0]=stu1;
        arr[1]=stu2;
        arr[2]=stu3;
        for (int i = 0; i < arr.length; i++) {
            Student temp = arr[i];  //temp对象变量
            System.out.println(temp.getName() +"..."+temp.getAge());
        }


    }
}
